package xyz.xtt.gateway.health;

import java.util.Map;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
@RequestMapping("/health")
public class HealthController {
	@GetMapping("/status")
	public ResponseEntity<String> health() {
		log.info("health/status=> ok");
		Map<String, String> responseText = Map.of("status", "up");
		return ResponseEntity.ok(JSONUtil.toJsonStr(responseText));
	}
}
